import React from 'react';
import {NavigationContainer} from '@react-navigation/native';
import {createNativeStackNavigator} from '@react-navigation/native-stack';
import routes from './routes';
const Stack = createNativeStackNavigator();

export default function App() {
  return (
    <NavigationContainer>
      <Stack.Navigator initialRouteName="Home">
        {Object.keys(routes).map(name => (
          <Stack.Screen name={name} key={name} component={routes[name]} />
        ))}
      </Stack.Navigator>
    </NavigationContainer>
  );
}
